package com.xm.spring5.test;


import com.xm.spring5.service.UserService;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

//@ExtendWith(SpringExtension.class)
//@ContextConfiguration("classpath:bean1.xml")  //加载配置文件

@SpringJUnitConfig(locations = "classpath:bean1.xml")  //复合注解 替代上面两个注解
class JTest5 {

    @Autowired
    private UserService service;

    @Test
    public void test1(){
        service.accountMoney();
    }
}

